﻿









-- 列出门禁设备信息
CREATE procedure [dbo].[SbInfo_List]
@flag bit -- FALSE:只查门禁设备 TRUE:查含有门禁点
as
-- 查询设备信息
if(@flag=1)
begin
select Sb_Info.sblsh,sbbs,sbh,sblx,kzlx,ljlx,comip,bddk,sjtbzt,jsdbh,jsdsblsh,sfkqkq,sbyt from Sb_Info
inner join Jsdsb_Info on(Sb_Info.sblsh=Jsdsb_Info.sblsh)
where sbyt=0 or sbyt=2
end
else
begin
select sblsh,sbbs,sbh,sblx,ljlx,comip,bddk,sjtbzt,sbyt from Sb_Info
where sbyt=0 or sbyt=2
end